/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component,PropTypes } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

export  default class PropsComponent extends Component {
    static defaultProps={
    	age:16,
    	sex:'人妖'	 
    }
    static propTypes={
    	name:PropTypes.string,
    	age:PropTypes.number,
    	sex:PropTypes.string.isRequired	
    }
    render(){
    	
    	return (
    		<View>
    		 <Text style={{backgroundColor:'red',fontSize:30}}>姓名：{this.props.name}</Text>
    		 <Text style={{backgroundColor:'red' ,fontSize:30}} >年龄：{this.props.age}</Text>
    		 <Text style={{backgroundColor:'red' ,fontSize:30}}>性别：{this.props.sex}</Text>	
    		</View>	


    		)  
    }		
}  

